home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 26 / Cream of the Crop 26.iso / os2 / te2_134t.zip / TE2INST.003 / Paths.scr < prev    next >
Text File  |  1997-07-03  |  2KB  |  80 lines

  1. ;; -------------------------------------------------------------------------
  2. ;; Paths.scr -- Te/2 Script Language Script
  3. ;;              Copyright 1994, Oberon Software
  4. ;;
  5. ;; If you need different upload and download paths from time to time,
  6. ;; use this as a template for making the switch menu driven.
  7. ;; -------------------------------------------------------------------------
  8.  
  9. global integer usrmnuItems  = 5
  10. global integer usrmnuSelect = 1
  11. global string  usrmnuTitle  = "Up/Download Path Settings"
  12. global string  usrmnuItem1  = "Default          "
  13. global string  usrmnuItem2  = "CompuServe       "
  14. global string  usrmnuItem3  = "MCI Mail         "
  15. global string  usrmnuItem4  = "QWK Mail         "
  16. global string  usrmnuItem5  = "Fido Mail        "
  17. global integer usrmnuTop    = 10
  18. global integer usrmnuLeft   = 20
  19. global integer usrmnuAttr   = 0x1f
  20. global integer usrmnuHiAttr = 0x71
  21.  
  22. global integer pscrGotDefaults
  23. global string  dfltDownPath
  24. global string  dfltUpPath
  25.  
  26. string CISDownPath  = "D:\Usr\Netmail\CIS\InBox"
  27. string CISUpPath    = "D:\Usr\Netmail\CIS\OutBox"
  28. string MCIDownPath  = "D:\Usr\Netmail\MCIMail\InBox"
  29. string MCIUpPath    = "D:\Usr\Netmail\MCIMail\OutBox"
  30. string QWKDownPath  = "D:\PMQWK\InBound"
  31. string QWKUpPath    = "D:\PMQWK\OutBound"
  32. string FidoDownPath = "D:\Usr\Netmail\Fido\InBox"
  33. string FidoUpPath   = "D:\Usr\Netmail\Fido\OutBox"
  34.  
  35. ;; -------------------------------------------------------------------------
  36.  
  37. subroutine getDefaults
  38.  
  39.   if !pscrGotDefaults
  40.     dfltDownPath     = DownloadPath
  41.     dfltUpPath       = UploadPath
  42.     pscrGotDefaults  = true
  43.   endif
  44.  
  45. endsub
  46.  
  47. ;; -------------------------------------------------------------------------
  48.  
  49. subroutine SetPaths
  50.  
  51.   if usrmnuSelect == 1
  52.     DownloadPath = dfltDownPath
  53.     UploadPath   = dfltUpPath
  54.   elseif usrmnuSelect == 2
  55.     DownloadPath = CISDownPath
  56.     UploadPath   = CISUpPath
  57.   elseif usrmnuSelect == 3
  58.     DownloadPath = MCIDownPath
  59.     UploadPath   = MCIUpPath
  60.   elseif usrmnuSelect == 4
  61.     DownloadPath = QWKDownPath
  62.     UploadPath   = QWKUpPath
  63.   elseif usrmnuSelect == 5
  64.     DownloadPath = FidoDownPath
  65.     UploadPath   = FidoUpPath
  66.   endif
  67.  
  68. endsub
  69.  
  70. ;; -------------------------------------------------------------------------
  71.  
  72. program
  73.   gosub getDefaults
  74.   run("UserMenu")
  75.   gosub SetPaths
  76.   message("^M^JDownload Path = %s", DownloadPath)
  77.   message("^M^JUpload Path   = %s^M^J", UploadPath)
  78.   end
  79.  
  80.